#!/usr/bin/env node

const timer1 = setInterval(()=>{
    console.log("time1");
},500);

const timer = setTimeout(() => {
    clearTimeout(timer1);
    let count = 0;
    const timer2 = setInterval(() => {
        if(count > 5){
            console.log('timer2 stop!')
        }else{
            console.log("timer2");
            count++;
        }
    },500)
    setInterval(()=>{
        clearInterval(timer2)
    },2510)
},5000)
//serTimerout()倒计时后调用；setInterval()每隔一段时间就调用

